package com.lang.downloader.http.config;

import lombok.extern.slf4j.Slf4j;

import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;

@Slf4j
public class TrustAllHostnameVerifier implements HostnameVerifier {
    @Override
    public boolean verify(String urlHostName, SSLSession session) {
        log.warn("Warning: URL Host: {} vs. {}", urlHostName, session.getPeerHost());
        return true; //不校验主机地址 直接信任
    }
}
